package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.SeckillProduct;
import cn.wolfcode.domain.SeckillProductVo;
import cn.wolfcode.feign.fallback.SeckillProductFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 远程调用seckill服务
 */
@FeignClient(name = "seckill-service",fallback = SeckillProductFallback.class)
public interface SeckillProductVOApi  {
    //通过time获取Result,数据为List<SeckillProductVo>
    @RequestMapping("/seckillProduct/queryByTime1")
    Result<List<SeckillProductVo>> getSeckillProductVO(@RequestParam("time") Long time);
    @RequestMapping("/seckillProduct/querySeckillProducts")
    Result<List<SeckillProduct>> getSeckillProducts(@RequestParam("time") Long time);
}
